home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
mssghkct
/
sysmenu.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1998-11-20
|
4KB
|
112 lines
VERSION 4.00
Begin VB.Form frmSysMenu
BorderStyle = 3 'Fixed Dialog
Caption = "System Menu"
ClientHeight = 2475
ClientLeft = 2415
ClientTop = 3630
ClientWidth = 5085
Height = 2880
Icon = "SysMenu.frx":0000
Left = 2355
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2475
ScaleWidth = 5085
Top = 3285
Width = 5205
Begin MSGHOOKLibCtl.MsgHook MsgHook2
Left = 3195
OleObjectBlob = "SysMenu.frx":0442
Top = 1530
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "e-mail:"
Height = 210
Left = 60
TabIndex = 3
Top = 1080
Width = 510
End
Begin VB.Label Label1
Caption = $"SysMenu.frx":0470
Height = 675
Left = 60
TabIndex = 2
Top = 60
Width = 4965
End
Begin VB.Label lblMailTo
BackStyle = 0 'Transparent
Caption = "alexw@netvision.net.il"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 177
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 240
Left = 615
MouseIcon = "SysMenu.frx":0506
MousePointer = 99 'Custom
TabIndex = 1
Top = 1050
Width = 1875
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Copyright
1998, Alex Wainstein"
Height = 240
Left = 30
TabIndex = 0
Top = 780
Width = 3210
End
Begin MSGHOOKLibCtl.MsgHook MsgHook1
Left = 3630
OleObjectBlob = "SysMenu.frx":0658
Top = 1680
End
Attribute VB_Name = "frmSysMenu"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
'1. Use API to add some items to the system menu...
Dim hMenu As Long
hMenu = GetSystemMenu(hwnd, 0)
AppendMenu hMenu, MF_SEPARATOR, 0, ""
AppendMenu hMenu, MF_ENABLED Or MF_STRING, IDM_ABOUT, "&About"
'2. Setup Message Hook to prerocess WM_SYSCOMMAND message
MsgHook1.hwnd = hwnd
MsgHook1.AddMessage WM_SYSCOMMAND, mshPreProcess
End Sub
Private Sub lblMailTo_Click()
Dim res As Long
Dim lpOperation As String
Dim lpFile As String
Dim lpParameters As String
Dim lpDirectory As String
Dim nShowCmd As Long
lpOperation = "open"
lpFile = "MAILTO:" + lblMailTo
nShowCmd = vbNormalFocus
res = ShellExecute(hwnd, lpOperation, lpFile, lpParameters, ByVal lpDirectory, nShowCmd)
End Sub
Private Sub MsgHook1_Message(ByVal MsgId As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal MsgProcessing As Integer, MsgResult As Long)
Select Case MsgId
Case WM_SYSCOMMAND:
Select Case wParam
Case IDM_ABOUT
frmAbout.Show vbModal
End Select
End Select
End Sub